package com.pine.app.module.security.oauth.provider;

import com.pine.app.module.security.core.userdetails.UserDetails;
import com.pine.app.module.security.oauth.provider.token.OAuth2AccessToken;
import com.pine.app.module.security.oauth.support.OAuthRequestValidator;
import com.pine.app.module.security.oauth.support.HttpTokenRequest;

import javax.servlet.http.HttpServletRequest;

/**
 * @author xiaoyuan
 * @create 2020/3/7 14:35
 **/
public interface OAuth2TokenBuilder {

    DefaultOauth2TokenBuilder createRequest(HttpServletRequest request);

    DefaultOauth2TokenBuilder validateParams();

    DefaultOauth2TokenBuilder validateParams(HttpTokenRequest tokenRequest);

    OAuth2AccessToken createToken();

    OAuth2AccessToken createToken(HttpTokenRequest tokenRequest, UserDetails userDetails);

    OAuth2Authentication createOAuth2Authentication(HttpTokenRequest tokenRequest, UserDetails userDetails);

     HttpTokenRequest getTokenRequest();

     OAuthRequestValidator getoAuth2Authenticator();

    OAuth2Authentication getOAuth2Authentication();



}
